﻿using System;
using Infrastucture;

namespace TimeSplicerModule.DomainModels
{
    public class PriorityModel : DomainObject
    {
        private Guid _priorityGuid;
        private string _name;
        private string _priorityNameEnum;
        private int _level;
        private int _sortOrder;
        private bool _isActive;
        private Priority _priority; 

        public Guid PriorityGuid
        {
            get { return _priorityGuid; }
            set { SetProperty(ref _priorityGuid, value); }
        }
        public string Name
        {
            get { return _name; }
            set { SetProperty(ref _name, value); }
        }
        public string PriorityNameEnum
        {
            get { return _priorityNameEnum; }
            set
            {
                SetProperty(ref _priorityNameEnum, value);

                if (this.Priority.ToString() != value)
                    this.UpdateEnumeration<Priority>("Priority", value);
            }
        }
        public int Level
        {
            get { return _level; }
            set { SetProperty(ref _level, value); }
        }
        public int SortOrder
        {
            get { return _sortOrder; }
            set { SetProperty(ref _sortOrder, value); }
        }
        public bool IsActive
        {
            get { return _isActive; }
            set { SetProperty(ref _isActive, value); }
        }
        public Priority Priority
        {
            get { return _priority; }
            set
            {
                SetProperty(ref _priority, value);
                this.UpdateEnumerationString<Priority>("PriorityNameEnum", value);
            }
        }
    }
}
